Intro

Background: In a future study, we will be assessing the goals that people have when interacting with others in everyday life, and testing whether the goals people have predict how honest they are with the people they interact with. Before we can run the study, we need to decide which goals we want to assess. To do so, we generated a list of goals that we thought might be likely to predict honesty or dishonesty in everyday life. We are now rating each goal item we generated on several criteria to help us decide which goals are worth including in the study.

To generate the data used in this portfolio, 7 “experts” rated the likelihood that each goal could be accomplished through both a) honesty and b) dishonesty. What we want to do is select “polar goals” that pull for one end of honesty but not the other. That is, goals that are very likely to be achieved by honesty, and not likely to be achieved by dishonesty (and vice versa).

Plotting our responses

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0      ✔ purrr   0.3.5 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.5.0 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(plotly)
## 
## Attaching package: 'plotly'
## 
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following object is masked from 'package:graphics':
## 
##     layout
goals <- read.csv("data/TransposedGoals.csv")

After loading the necessary packages and our dataset, the first thing that I want to do is make a scatterplot showing the relationship between the two kinds of likelihood. Each point in the plot represents a goal item, the x-axis represents the average of 7 ratings of how likely it is that dishonesty would be used to achieve a goal, and the y-axis represtents the average of 7 ratings of how likely it is that honesty would be used to achieve a goal.

What this plot nicely shows is that the expectation that honesty would be good for achieving a goal is strongly negatively related to the expectation that dishonesty would be good for achieving a goal (r = -.84). It also shows that there are a lot of goals for which neither honesty nor dishonesty is expected to be particularly useful. What we want to do now is to filter out all these mediocre goals, so that we only have the “polar goals” we want, which in this case are the goals in the upper left and lower right quadrants of the plot.

ggplot(data = goals, aes(x = Avg_DisLikelihood, y = Avg_HonLikelihood))+
  geom_point()+
  theme_bw()+
  labs(title = "Scatterplot of Goal Expectancies",
       x = "Likelihood that dishonesty would achieve goal",
       y = "Likelihood that honesty would achieve goal")

ggsave("goals_scatter.png", plot = last_plot(), device = "png")
## Saving 4 x 4 in image
goals %>%
  summarize(r = cor(Avg_DisLikelihood, Avg_HonLikelihood))
##            r
## 1 -0.8360762

Identifying polar goals

What I want to do now is use some of the qualities of our data to help me decide what cutoffs I should use to filter for only polar goals. The first thing I’ve done is to display the distribution of difference scores representing the difference between goal expectancies for honesty and dishonesty. The histogram shows a bimodal-ish distribution, which shows that a there are a lot of goals with difference scores of around -1.75 as well as a lot with difference scores around +2.5.

ggplot(goals, aes(x = Diff_Likelihood))+
  geom_histogram(fill = "grey", color = "black")+
  theme_bw()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Second, I’d like to get a more basic summary of the characteristics of how difference scores, as well as main average likelihood scores are distributed across goals. Looking at difference scores, we can see that the lower and upper quartile are -1.4 and +2.1 respectively, which is also quite close to the humps that we just saw in the histogram of difference scores. We can also see the quartiles and medians for the average honesty and dishonesty ratings, which help us get a sense of how the “strength” of our goals is distributed.

goals %>%
  summary
##    CASE_LBL             R1_Hon          R2_Hon          R3_Hon     
##  Length:155         Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  Class :character   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:3.000  
##  Mode  :character   Median :3.000   Median :3.000   Median :4.000  
##                     Mean   :2.948   Mean   :3.065   Mean   :3.523  
##                     3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000  
##                     Max.   :5.000   Max.   :5.000   Max.   :5.000  
##                                                                    
##      R4_Hon          R5_Hon          R6_Hon          R7_Hon          Goal      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.00   Min.   :  1.0  
##  1st Qu.:2.000   1st Qu.:3.000   1st Qu.:2.000   1st Qu.:2.00   1st Qu.: 39.5  
##  Median :2.000   Median :4.000   Median :3.000   Median :3.00   Median : 78.0  
##  Mean   :2.755   Mean   :3.574   Mean   :3.271   Mean   :3.09   Mean   : 78.0  
##  3rd Qu.:4.000   3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:4.00   3rd Qu.:116.5  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.00   Max.   :155.0  
##                                                                                
##      R1_Dis          R2_Dis          R3_Dis          R4_Dis     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :3.000   Median :3.000   Median :3.000   Median :4.000  
##  Mean   :3.084   Mean   :2.619   Mean   :3.135   Mean   :3.226  
##  3rd Qu.:4.000   3rd Qu.:3.000   3rd Qu.:4.000   3rd Qu.:5.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##                                                                 
##      R5_Dis          R6_Dis          R7_Dis  Avg_HonLikelihood
##  Min.   :1.000   Min.   :1.000   Min.   :1   Min.   :1.000    
##  1st Qu.:2.000   1st Qu.:1.000   1st Qu.:2   1st Qu.:2.429    
##  Median :4.000   Median :3.000   Median :3   Median :3.000    
##  Mean   :3.497   Mean   :2.604   Mean   :3   Mean   :3.175    
##  3rd Qu.:5.000   3rd Qu.:4.000   3rd Qu.:4   3rd Qu.:4.143    
##  Max.   :5.000   Max.   :5.000   Max.   :5   Max.   :5.000    
##                  NA's   :1                                    
##  Avg_DisLikelihood Diff_Likelihood  
##  Min.   :1.000     Min.   :-4.0000  
##  1st Qu.:2.000     1st Qu.:-1.4286  
##  Median :3.286     Median :-0.2857  
##  Mean   :3.023     Mean   : 0.1524  
##  3rd Qu.:3.857     3rd Qu.: 2.1429  
##  Max.   :5.000     Max.   : 4.0000  
## 

Filtering for polar goals

Now I’d like to use the information we just learned from our data to create a filtered dataset that contains only polar goals. I’ve done so using 3 criteria. 1. A difference score in either the top or bottom 25% of difference scores 2. An average honesty rating that is greater than the median rating for honesty or within the bottom 25% of ratings for honesty 3. An average dishonesty rating that is greater than the median rating for honesty or within the bottom 25% of ratings for dishonesty

A new scatterplot shows that we have successfully filtered out the ambivalent goals that scored around the midpoint for our goals.

polar_goals <- goals %>%
  filter(Diff_Likelihood >= 2.1 | Diff_Likelihood <= -1.4,
         Avg_HonLikelihood >= 3.0 | Avg_HonLikelihood <= 2.4,
         Avg_DisLikelihood >= 3.2 | Avg_DisLikelihood <= 2.00)

ggplot(data = polar_goals, aes(x = Avg_DisLikelihood, y = Avg_HonLikelihood))+
  geom_point(position = "jitter")+
  theme_bw()

What I’d now like to do is get a list of the goals that are left after filtering, and see how many we have left pulling for honesty and dishonesty. After filtering, we are left with 28 polar goals pulling for dishonesty, and 36 polar goals pulling for honesty.

polar_goals <- polar_goals %>%
  mutate(likelihood = if_else(Avg_HonLikelihood > 2.99, "Honesty", "Dishonesty"))
polar_goals %>%
  group_by(likelihood) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   likelihood [2]
##   likelihood     n
##   <chr>      <int>
## 1 Dishonesty    28
## 2 Honesty       36
polar_goals %>%
  filter(likelihood == "Honesty") %>%
  arrange(desc(Diff_Likelihood)) %>%
  arrange(desc(Avg_HonLikelihood))
##                 CASE_LBL R1_Hon R2_Hon R3_Hon R4_Hon R5_Hon R6_Hon R7_Hon Goal
## 1  Hon_CorrectInaccurate      5      5      5      5      5      5      5   57
## 2          Hon_AvoidLiar      5      5      5      5      5      5      5   24
## 3         Hon_NeedToKnow      4      5      5      5      5      5      5   12
## 4        Hon_ExpFeelings      4      5      5      5      5      5      5    8
## 5            Hon_ImpInfo      4      5      5      5      5      5      5   27
## 6         Hon_BeYourself      5      5      5      5      5      5      4   70
## 7     Hon_ExpressHowFeel      4      5      5      5      5      5      5   74
## 8         Hon_Self_Image      4      4      5      5      5      5      5   48
## 9        Hon_AvoidViolat      4      4      5      5      5      5      5   37
## 10       Hon_ShareMyself      5      4      5      5      5      5      4   49
## 11            Hon_BeAuth      4      4      5      5      5      5      4   73
## 12       Hon_ShowHonesty      4      4      5      4      5      5      5    9
## 13             Hon_Chest      3      5      5      5      5      4      5   28
## 14         Hon_AvoidFake      4      4      5      4      5      5      5   61
## 15        Hon_RightThing      4      4      5      4      5      5      5    2
## 16         Hon_AvoidConf      4      4      5      4      5      5      5   43
## 17         Hon_FosterUnd      4      4      4      5      5      5      5  104
## 18         Hon_CommClear      4      5      4      4      5      5      5   66
## 19        Hon_AvoidGross      5      1      5      5      5      5      5   33
## 20         Hon_AcknFault      4      4      5      4      4      5      5    1
## 21        Hon_BeBestSelf      4      3      5      4      5      5      5   23
## 22         Hon_GainTrust      3      4      4      5      5      5      5   22
## 23       Hon_AvoidPollut      5      3      5      4      5      5      4   34
## 24         Hon_TreatResp      5      3      4      5      5      5      4   69
## 25          Hon_AvoidMis      4      4      4      5      5      4      4   17
## 26   Hon_ReduUncertainty      4      4      4      3      5      5      5   41
## 27        Hon_ConveyInfo      3      3      5      4      5      5      5   46
## 28            Hon_GoodEx      4      3      4      4      5      5      5   16
## 29             Hon_BeUnd      3      3      4      5      5      5      5   65
## 30        Hon_EffecCoord      2      4      4      4      5      5      5   45
## 31        Hon_HelpDoBett      4      4      4      4      3      5      5   51
## 32        Hon_HelpProduc      3      4      5      3      5      5      4   71
## 33           Hon_VoidCov      4      1      4      5      5      5      5    6
## 34         Hon_FacilWork      3      4      4      4      5      5      4   39
## 35        Hon_HelpImprov      4      3      4      4      5      5      4   40
## 36         Hon_FacilPlan      3      3      4      4      5      5      4   21
##    R1_Dis R2_Dis R3_Dis R4_Dis R5_Dis R6_Dis R7_Dis Avg_HonLikelihood
## 1       1      1      1      1      1      1      1          5.000000
## 2       1      1      1      2      1      1      1          5.000000
## 3       2      1      1      1      1      1      1          4.857143
## 4       3      1      1      1      1      1      1          4.857143
## 5       2      1      2      1      1      1      1          4.857143
## 6       2      1      1      1      1      1      2          4.857143
## 7       2      1      2      1      1      1      1          4.857143
## 8       2      2      1      2      1      1      1          4.714286
## 9       2      2      2      1      1      2      3          4.714286
## 10      3      2      1      5      1      1      1          4.714286
## 11      1      1      1      1      1      1      1          4.571429
## 12      3      2      1      1      1      1      1          4.571429
## 13      4      1      2      1      1      1      1          4.571429
## 14      2      2      2      1      2      1      1          4.571429
## 15      2      2      2      1      2      2      1          4.571429
## 16      2      2      1      2      2      2      1          4.571429
## 17      4      2      2      1      1      1      1          4.571429
## 18      3      2      2      2      2      1      1          4.571429
## 19      1      1      1      1      1      1      1          4.428571
## 20      4      2      1      1      1      1      1          4.428571
## 21      3      2      1      1      1      2      1          4.428571
## 22      3      2      2      2      2      2      1          4.428571
## 23      2      3      2      2      1      2      2          4.428571
## 24      2      3      2      1      2      2      2          4.428571
## 25      2      2      2      2      1      1      1          4.285714
## 26      2      2      2      2      1      1      1          4.285714
## 27      3      3      1      1      1      1      1          4.285714
## 28      2      2      2      2      2      1      1          4.285714
## 29      3      3      2      1      2      1      1          4.285714
## 30      3      2      2      1      1      1      1          4.142857
## 31      2      2      1      2      1      2      2          4.142857
## 32      3      2      2      1      1      2      2          4.142857
## 33      3      1      2      2      2      3      1          4.142857
## 34      3      2      2      1      1      2      3          4.142857
## 35      2      2      2      2      2      2      2          4.142857
## 36      3      2      2      1      1      1      2          4.000000
##    Avg_DisLikelihood Diff_Likelihood likelihood
## 1           1.000000        4.000000    Honesty
## 2           1.142857        3.857143    Honesty
## 3           1.142857        3.714286    Honesty
## 4           1.285714        3.571429    Honesty
## 5           1.285714        3.571429    Honesty
## 6           1.285714        3.571429    Honesty
## 7           1.285714        3.571429    Honesty
## 8           1.428571        3.285714    Honesty
## 9           1.857143        2.857143    Honesty
## 10          2.000000        2.714286    Honesty
## 11          1.000000        3.571429    Honesty
## 12          1.428571        3.142857    Honesty
## 13          1.571429        3.000000    Honesty
## 14          1.571429        3.000000    Honesty
## 15          1.714286        2.857143    Honesty
## 16          1.714286        2.857143    Honesty
## 17          1.714286        2.857143    Honesty
## 18          1.857143        2.714286    Honesty
## 19          1.000000        3.428571    Honesty
## 20          1.571429        2.857143    Honesty
## 21          1.571429        2.857143    Honesty
## 22          2.000000        2.428571    Honesty
## 23          2.000000        2.428571    Honesty
## 24          2.000000        2.428571    Honesty
## 25          1.571429        2.714286    Honesty
## 26          1.571429        2.714286    Honesty
## 27          1.571429        2.714286    Honesty
## 28          1.714286        2.571429    Honesty
## 29          1.857143        2.428571    Honesty
## 30          1.571429        2.571429    Honesty
## 31          1.714286        2.428571    Honesty
## 32          1.857143        2.285714    Honesty
## 33          2.000000        2.142857    Honesty
## 34          2.000000        2.142857    Honesty
## 35          2.000000        2.142857    Honesty
## 36          1.714286        2.285714    Honesty
polar_goals %>%
  filter(likelihood == "Dishonesty") %>%
  arrange(Diff_Likelihood) %>%
    arrange(desc(Avg_DisLikelihood))
##             CASE_LBL R1_Hon R2_Hon R3_Hon R4_Hon R5_Hon R6_Hon R7_Hon Goal
## 1      Hon_GetSometh      1      1      1      1      1      1      1   98
## 2      Hon_BeSeeBett      2      1      1      1      1      1      1  142
## 3      Hon_KeepLieGo      1      1      1      1      1      1      1  130
## 4       Hon_HidePers      1      2      1      1      1      1      1   75
## 5        Hon_CoverUp      3      1      2      1      1      1      1  117
## 6      Hon_AvoidArgu      2      2      2      1      2      2      2  108
## 7      Hon_AvoidVuln      2      2      1      1      1      3      2  121
## 8       Hon_AvoidBad      2      2      2      2      1      2      3  136
## 9   Hon_ProtFeelings      2      3      2      1      3      2      2   13
## 10  Hon_TrickSomeone      2      1      1      1      1      1      1  122
## 11   Hon_AvoidOverre      2      3      2      1      2      1      2   93
## 12        Hon_Secret      5      1      2      1      2      2      1   76
## 13   Hon_AvoidUncomf      2      2      3      1      3      2      1   91
## 14      Hon_AvoidAwk      2      3      2      1      2      2      3   83
## 15     Hon_AvoidReje      2      2      2      1      3      2      2  140
## 16    Hon_LookBetter      2      3      3      2      2      1      2   31
## 17     Hon_DecMyself      1      1      1      1      1      1      1  105
## 18      Hon_ProtPriv      1      2      3      1      3      2      2  101
## 19   Hon_AvoidCorrec      2      1      2      1      3      4      2  103
## 20    Hon_AvoidWaves      2      2      4      3      2      2      1   55
## 21    Hon_AvoidOther      2      3      3      2      1      1      1  147
## 22      Hon_StopConv      2      2      3      2      2      2      1  109
## 23     Hon_PresrvEng      2      3      2      1      2      1      3  115
## 24     Hon_KeepBrief      2      3      3      1      2      2      1  151
## 25    Hon_ConfToRole      2      2      2      1      3      3      2  155
## 26      Hon_Surprise      3      3      3      1      1      1      1   77
## 27 Hon_ConfuseOthers      2      1      2      1      2      1      1   99
## 28      Hon_ConvMyse      2      2      1      1      3      1      2  106
##    R1_Dis R2_Dis R3_Dis R4_Dis R5_Dis R6_Dis R7_Dis Avg_HonLikelihood
## 1       5      5      5      5      5      5      5          1.000000
## 2       5      5      5      4      5      5      4          1.142857
## 3       5      4      4      4      5      5      5          1.000000
## 4       4      3      5      5      5      5      5          1.142857
## 5       4      4      5      4      5      5      5          1.428571
## 6       4      4      5      5      5      5      4          1.857143
## 7       4      4      5      5      5      3      5          1.714286
## 8       4      4      5      4      5      5      4          2.000000
## 9       4      4      4      5      5      5      4          2.142857
## 10      4      4      5      3      5      5      4          1.142857
## 11      4      4      5      4      5      4      3          1.857143
## 12      2      5      5      5      5      2      5          2.000000
## 13      3      3      5      5      5      4      4          2.000000
## 14      4      3      5      5      5      3      4          2.142857
## 15      4      2      5      5      4      4      4          2.000000
## 16      3      3      5      5      5      3      4          2.142857
## 17      5      5      3      4      3      3      4          1.000000
## 18      3      4      4      5      5      2      4          2.000000
## 19      4      2      4      5      5      3      4          2.142857
## 20      4      3      4      4      5      3      4          2.285714
## 21      4      2      4      4      5      3      4          1.857143
## 22      3      3      4      4      5      3      4          2.000000
## 23      3      3      4      4      5      3      4          2.000000
## 24      3      2      4      4      5      4      4          2.000000
## 25      4      3      4      5      4      2      4          2.142857
## 26      3      3      4      4      5      2      4          1.857143
## 27      3      3      4      1      4      4      5          1.428571
## 28      3      3      5      4      3      1      4          1.714286
##    Avg_DisLikelihood Diff_Likelihood likelihood
## 1           5.000000       -4.000000 Dishonesty
## 2           4.714286       -3.571429 Dishonesty
## 3           4.571429       -3.571429 Dishonesty
## 4           4.571429       -3.428571 Dishonesty
## 5           4.571429       -3.142857 Dishonesty
## 6           4.571429       -2.714286 Dishonesty
## 7           4.428571       -2.714286 Dishonesty
## 8           4.428571       -2.428571 Dishonesty
## 9           4.428571       -2.285714 Dishonesty
## 10          4.285714       -3.142857 Dishonesty
## 11          4.142857       -2.285714 Dishonesty
## 12          4.142857       -2.142857 Dishonesty
## 13          4.142857       -2.142857 Dishonesty
## 14          4.142857       -2.000000 Dishonesty
## 15          4.000000       -2.000000 Dishonesty
## 16          4.000000       -1.857143 Dishonesty
## 17          3.857143       -2.857143 Dishonesty
## 18          3.857143       -1.857143 Dishonesty
## 19          3.857143       -1.714286 Dishonesty
## 20          3.857143       -1.571429 Dishonesty
## 21          3.714286       -1.857143 Dishonesty
## 22          3.714286       -1.714286 Dishonesty
## 23          3.714286       -1.714286 Dishonesty
## 24          3.714286       -1.714286 Dishonesty
## 25          3.714286       -1.571429 Dishonesty
## 26          3.571429       -1.714286 Dishonesty
## 27          3.428571       -2.000000 Dishonesty
## 28          3.285714       -1.571429 Dishonesty

Trying to make a fancy plot

Now that I’ve taken care of the basics, I’d like to try out some fancy ways of displaying more information about these data.

So, first my goal is the make an interactive version of our scatterplot from earlier, that tells you the name of each goal when you hover over it. I also want to use color to more clearly emphasize the size of the difference between honesty and dishonesty scores for each goal.

Using the plotly package, I was able to make an interactive plot. To make it show the actual name of each goal, I had to specify a new aesthetic “label” for the tooltip to use. To get the points to have the gradient effect I wanted, I also had to create an absolute value version of the difference scores, so that goals that are more “polar” will be lighter than more ambivalent goals, regardless of whether they are pulling for the honest or the dishonest pole.

I also wanted the labels to be as helpful as possible, by having the actual name of the goals as they were presented to raters. Unfortunately, this required me to create a new variable, labeling each goal by hand.

#absolute value differences
goals <- goals %>%
  mutate(abs_diff = abs(Diff_Likelihood))
  
goals_interactive <- goals %>%
  ggplot(aes(x = Avg_DisLikelihood, y = Avg_HonLikelihood, label = CASE_LBL))+
  geom_point(aes(color = abs_diff), position = "jitter")+
  theme_bw()

ggplotly(tooltip = c("label"))

I’m so excited about this plot! The only problem with it is that it is using names from the csv file, which are not consistently helpful for telling us what each goal actually represents. I want the labels to be as helpful as possible, by having the actual name of the goals as they were presented to raters. Unfortunately, this required me to create a new variable, labeling each goal by hand.

goals <- goals %>%
  mutate(goal_name = case_when(
    CASE_LBL == "Hon_AcknFault" ~ "Acknowledge fault",
    CASE_LBL == "Hon_RightThing" ~ "Know that I did the right thing",
    CASE_LBL == "Hon_Consequences" ~ "Test the consequences",
    CASE_LBL == "Hon_GetWant" ~ "Get what I want",
    CASE_LBL == "Hon_AvProb" ~ "Avoid making a problem worse",
    CASE_LBL == "Hon_VoidCov" ~ "Avoid the coverup",
    CASE_LBL == "Hon_RecogProb" ~ "Recognize my own problems",
    CASE_LBL == "Hon_ExpFeelings" ~ "Express my feelings",
    CASE_LBL == "Hon_ShowHonesty" ~ "Show that I am an honest person",
    CASE_LBL == "Hon_ShowFairness" ~ "Show that I am fair and balanced",
    CASE_LBL == "Hon_ProtEmb" ~ "Protect a friend from embarassment",
    CASE_LBL == "Hon_NeedToKnow" ~ "Tell someone something they need to know",
    CASE_LBL == "Hon_ProtFeelings" ~ "Protect someone's feelings",
    CASE_LBL == "Hon_BeKind" ~ "Be kind",
    CASE_LBL == "Hon_KeepFromEmb" ~ "Keep someone from embarassing themselves",
    CASE_LBL == "Hon_GoodEx" ~ "Set a good example for others",
    CASE_LBL == "Hon_AvoidMis" ~ "Avoid a misunderstanding",
    CASE_LBL == "Hon_FollowNorms" ~ "Follow norms",
    CASE_LBL == "Hon_AvoidGuilt" ~ "Avoid feeling guilty",
    CASE_LBL == "Hon_FacilConvo" ~ "Facilitate conversation",
    CASE_LBL == "Hon_FacilPlan" ~ "Facilitate people's planning",
    CASE_LBL == "Hon_GainTrust" ~ "Gain trust",
    CASE_LBL == "Hon_BeBestSelf" ~ "Be my best self",
    CASE_LBL == "Hon_AvoidLiar" ~ "Avoid being a liar",
    CASE_LBL == "Hon_DisapParents" ~ "Avoid disappointing my parents",
    CASE_LBL == "Hon_HurtOther" ~ "Hurt someone",
    CASE_LBL == "Hon_ImpInfo" ~ "Convey important information",
    CASE_LBL == "Hon_Chest" ~ "Get something off my chest",
    CASE_LBL == "Hon_AvoidDisap" ~ "Avoid disapproval",
    CASE_LBL == "Hon_AvBreakTrust" ~ "Avoid breaking someone's trust",
    CASE_LBL == "Hon_LookBetter" ~ "Look better than I really am",
    CASE_LBL == "Hon_BeAttrac" ~ "Be more attractive",
    CASE_LBL == "Hon_AvoidGross" ~ "Avoid the gross feeling I get from lying",
    CASE_LBL == "Hon_AvoidPollut" ~ "Avoid polluting the relationship",
    CASE_LBL == "Hon_KeepFirm" ~ "Keep a firm ground",
    CASE_LBL == "Hon_BeAware" ~ "Know what is going on",
    CASE_LBL == "Hon_AvoidViolat" ~ "Avoid a feeling of moral violation",
    CASE_LBL == "Hon_GetHonesty" ~ "Get someone else to be honest",
    CASE_LBL == "Hon_FacilWork" ~ "Facilitate others' work",
    CASE_LBL == "Hon_HelpImprov" ~ "Help someone improve",
    CASE_LBL == "Hon_ReduUncertainty" ~ "Reduce uncertainty",
    CASE_LBL == "Hon_ImproveEffic" ~ "Improve efficiency",
    CASE_LBL == "Hon_AvoidConf" ~ "Avoid Confusion",
    CASE_LBL == "Hon_AvoidSusp" ~ "Avoid beeing seen as suspicious",
    CASE_LBL == "Hon_EffecCoord" ~ "Effectively coordinate with others",
    CASE_LBL == "Hon_GetDeserve" ~ "Get something I deserve",
    CASE_LBL == "Hon_Self_Image" ~ "Act consistently with my self-image (as an honest person)",
    CASE_LBL == "Hon_ShareMyself" ~ "Share myself with others",
    CASE_LBL == "Hon_HelpGetSom" ~ "Help someone get something important to them",
    CASE_LBL == "Hon_HelpDoBett" ~ "Help someone do better in the future",
    CASE_LBL == "Hon_HelpSolveProb" ~ "Help someone solve a problem",
    CASE_LBL == "Hon_FollowScript" ~ "Follow the script",
    CASE_LBL == "Hon_AvoidWaves" ~ "Avoid making waves",
    CASE_LBL == "Hon_PutInPlace" ~ "Put someone in their place",
    CASE_LBL == "Hon_CorrectInaccurate" ~ "Correct an inaccurate statement",
    CASE_LBL == "Hon_SeekHelp" ~ "Seek help or support from someone",
    CASE_LBL == "Hon_BeHumb" ~ "Be humble",
    CASE_LBL == "Hon_BeResp" ~ "Be respected by others",
    CASE_LBL == "Hon_AvoidFake" ~ "Avoid seeming fake or insincere",
    CASE_LBL == "Hon_ActNat" ~ "Act naturally",
    CASE_LBL == "Hon_MakeWorth" ~ "Make the conversation worth having",
    CASE_LBL == "Hon_MakeMean" ~ "Make the conversation meaningful",
    CASE_LBL == "Hon_BeUnd" ~ "Be understood",
    CASE_LBL == "Hon_CommClear" ~ "Communicate clearly",
    CASE_LBL == "Hon_Deepen" ~ "Deepen my connection with someone",
    CASE_LBL == "Hon_AvoidCaught" ~ "Avoid getting caught in a lie",
    CASE_LBL == "Hon_TreatResp" ~ "Treat someone with respect",
    CASE_LBL == "Hon_BeYourself" ~ "Be yourself",
    CASE_LBL == "Hon_HelpProduc" ~ "Help someone be more productive",
    CASE_LBL == "Hon_LongRun" ~ "Help someone in the long run",
    CASE_LBL == "Hon_BeAuth" ~ "Be authentic",
    CASE_LBL == "Hon_HidePers" ~ "Hide something personal",
    CASE_LBL == "Hon_Secret" ~ "Keep a secret",
    CASE_LBL == "Hon_Surprise" ~ "Surprise someone",
    CASE_LBL == "Hon_EnsurSafe" ~ "Ensure my safety",
    CASE_LBL == "Hon_NotFeelBad" ~ "Not feel bad about myself",
    CASE_LBL == "Hon_AvoidJudg" ~ "Avoid judgement",
    CASE_LBL == "Hon_GetWhatIWant" ~ "Get what I want",
    CASE_LBL == "Hon_KeepPeace" ~ "Keep the peace",
    CASE_LBL == "Hon_AvoidAwk" ~ "Avoid an awkward situation",
    CASE_LBL == "Hon_AvoidAng" ~ "Avoid making someone angry",
    CASE_LBL == "Hon_ChangeBeh" ~ "Change someone's behavior",
    CASE_LBL == "Hon_BeBest" ~ "Be the best person",
    CASE_LBL == "Hon_AvoidDisSomeone" ~ "Avoid disappointing someone",
    CASE_LBL == "Hon_Story" ~ "Tell a good story",
    CASE_LBL == "Hon_AvoidUncomf" ~ "Avoid making someone uncomfortable",
    CASE_LBL == "Hon_WasteTime" ~ "Avoid wasting my time",
    CASE_LBL == "Hon_AvoidOverre" ~ "Avoid an overreaction",
    CASE_LBL == "Hon_AvoidHassle" ~ "Avoid dealing with the hassle",
    CASE_LBL == "Hon_AvoidDoing" ~ "Avoid doing something you don't want to do",
    CASE_LBL == "Hon_GetAtten" ~ "Get attention",
    CASE_LBL == "Hon_GetSometh" ~ "Get something that I wouldn't be able to get without lying",
    CASE_LBL == "Hon_ConfuseOthers" ~ "Confuse others",
    CASE_LBL == "Hon_GainConfi" ~ "Help someone gain confidence",
    CASE_LBL == "Hon_ProtPriv" ~ "Protect my privacy",
    CASE_LBL == "Hon_AvoidSuff" ~ "Avoid others' suffering",
    CASE_LBL == "Hon_AvoidCorrec" ~ "Avoid correction",
    CASE_LBL == "Hon_FosterUnd" ~ "Foster understanding",
    CASE_LBL == "Hon_DecMyself" ~ "Deceive myself",
    CASE_LBL == "Hon_ConvMyse" ~ "Convince myself of something",
    CASE_LBL == "Hon_FeelTrue" ~ "Feel as though something is true",
    CASE_LBL == "Hon_AvoidArgu" ~ "Avoid an argument",
    CASE_LBL == "Hon_StopConv" ~ "Get out of a conversation",
    CASE_LBL == "Hon_ToLookGood" ~ "Look good to others",
    CASE_LBL == "Hon_ControlOther" ~ "Control someone",
    CASE_LBL == "Hon_AvoidEmb" ~ "Avoid embarassment",
    CASE_LBL == "Hon_DrawAtten" ~ "Draw attention to what is most important",
    CASE_LBL == "Hon_ExplMyself" ~ "Avoid having to explain myself",
    CASE_LBL == "Hon_PresrvEng" ~ "Preserve my energy",
    CASE_LBL == "Hon_Strategy" ~ "Allow a strategy to play out",
    CASE_LBL == "Hon_CoverUp" ~ "Cover up a misdeed",
    CASE_LBL == "Hon_AvoidPunish" ~ "Avoid punishment",
    CASE_LBL == "Hon_ProtectRel" ~ "Protect my relationship with someone",
    CASE_LBL == "Hon_PositvDir" ~ "Redirect the conversation in a more positive direction",
    CASE_LBL == "Hon_AvoidVuln" ~ "Avoid being vulnerable",
    CASE_LBL == "Hon_TrickSomeone" ~ "Trick someone",
    CASE_LBL == "Hon_EntertSelf" ~ "Entertain myself",
    CASE_LBL == "Hon_BePolite" ~ "Be polite",
    CASE_LBL == "Hon_PleaseOther" ~ "Please someone",
    CASE_LBL == "Hon_GentleOther" ~ "Be gentle with others",
    CASE_LBL == "Hon_MakeFair" ~ "Make things fair",
    CASE_LBL == "Hon_Autonomy" ~ "Assert my autonomy or independence",
    CASE_LBL == "Hon_HurtReput" ~ "Hurt someone's reputation",
    CASE_LBL == "Hon_KeepLieGo" ~ "Keep a previous lie going",
    CASE_LBL == "Hon_SeemSmart" ~ "Seem knowledgable or intelligent",
    CASE_LBL == "Hon_GetAct" ~ "Get someone to act a certain way",
    CASE_LBL == "Hon_AvoidLose" ~ "Avoid losing something",
    CASE_LBL == "Hon_HowToAct" ~ "Avoid not knowing how to act",
    CASE_LBL == "Hon_AvoidBad" ~ "Avoid something bad that you expected",
    CASE_LBL == "Hon_137" ~ "Avoid feeling shame",
    CASE_LBL == "Hon_KeepSmooth" ~ "Keep the interaction going smoothly",
    CASE_LBL == "Hon_MakeLike" ~ "Make someone like you",
    CASE_LBL == "Hon_AvoidReje" ~ "Avoid rejection",
    CASE_LBL == "Hon_GetOtherDo" ~ "Get someone to do what you needed them to do",
    CASE_LBL == "Hon_BeSeeBett" ~ "Be seen as better than I really am",
    CASE_LBL == "Hon_SeemFriendly" ~ "Seem friendly",
    CASE_LBL == "Hon_GetAhead" ~ "Get ahead",
    CASE_LBL == "Hon_AvoidAccu" ~ "Avoid being accused of wrongdoing",
    CASE_LBL == "Hon_AvoidOther" ~ "Avoid a particular person",
    CASE_LBL == "Hon_MakeFeelBet" ~ "Make someone feel better in the moment",
    CASE_LBL == "Hon_ProtectWorr" ~ "Protect someone from being worried",
    CASE_LBL == "Hon_ContinConvo" ~ "Keep the conversation going",
    CASE_LBL == "Hon_KeepBrief" ~ "Keep the interaction brief",
    CASE_LBL == "Hon_FeelClose" ~ "Feel close to someone",
    CASE_LBL == "Hon_GetEven" ~ "Get even with someone",
    CASE_LBL == "Hon_SayExpec" ~ "Say or do what was expected",
    CASE_LBL == "Hon_ConfToRole" ~ "Conform to a role"))

I also took this opportunity to filter out some duplicate goals, by not giving them names. Now, let’s try again.

goals_interactive <- goals %>%
  filter(!is.na(goal_name)) %>%
  ggplot(aes(x = Avg_DisLikelihood, y = Avg_HonLikelihood, label = goal_name))+
  geom_point(aes(color = abs_diff), position = "jitter")+
  theme_bw()+
  labs(title = "Scatterplot of Goal Expectancies",
       x = "Likelihood that dishonesty would achieve goal",
       y = "Likelihood that honesty would achieve goal",
       color = "Difference")

ggplotly(tooltip = c("label"))

Hurray! That worked beautifully I think. Now you can pick out any goal you like from the scatterplot, and instantly figure out which goal it is, and easily get a good sense of how much we expected that goal to be achievably via honesty and/or dishonesty.

Trying another cool plot

For my last experiment, I’d like to try making one more plot which displays not only difference between average likelihood ratings for honesty and dishonesty for each goal, but also gives us a sense of how much variability there was between our 7 raters in their likelihood ratings for each goal.

To start, I calculated difference scores separately for each rater, and then calculated a standard deviation of difference scores across raters for each goal. Then, I made a chart showing the average difference for likelihood ratings for each goal, with error bars showing the SD for difference scores.

goals <- goals %>%
  mutate(
    R1_Dif = R1_Hon - R1_Dis,
    R2_Dif = R2_Hon - R2_Dis,
    R3_Dif = R3_Hon - R3_Dis,
    R4_Dif = R4_Hon - R4_Dis,
    R5_Dif = R5_Hon - R5_Dis,
    R6_Dif = R6_Hon - R6_Dis,
    R7_Dif = R7_Hon - R7_Dis)

goals <- goals %>%
  group_by(CASE_LBL) %>%
  mutate(sd = sd(unlist(select(cur_data(), R1_Dif:R7_Dif))))

goals_sd <- goals %>%
  filter(!is.na(goal_name)) %>%
ggplot(aes(x = Diff_Likelihood, y = reorder(goal_name, Diff_Likelihood), label = goal_name))+
         geom_point()+
  geom_errorbar(aes(xmin = Diff_Likelihood - sd, xmax = Diff_Likelihood + sd))+
  theme(axis.text.y = element_blank(),
        axis.ticks.y = element_blank())+
  theme_bw()

ggplotly(goals_sd, tooltip = "label") %>%
  layout(yaxis = list(showticklabels = FALSE))

The main thing we can see here is that there are a lot of goals, and quite a bit of variability in terms of how much different raters expected goals to be achieved by honesty or dishonesty. However, the plot is too all-encompassing and overwhelming to offer any useful information about any given goal in particular.

What I would like to do now is select a few exemplar goals, which seem to (a) tap into most of the important themes/contents of goals and (b) represent goals from the range of honesty vs. dishonesty

goals %>%
  arrange(Diff_Likelihood)
## # A tibble: 155 × 29
## # Groups:   CASE_LBL [155]
##    CASE_LBL R1_Hon R2_Hon R3_Hon R4_Hon R5_Hon R6_Hon R7_Hon  Goal R1_Dis R2_Dis
##    <chr>     <int>  <int>  <int>  <int>  <int>  <int>  <int> <int>  <int>  <int>
##  1 Hon_Get…      1      1      1      1      1      1      1    98      5      5
##  2 Hon_Kee…      1      1      1      1      1      1      1   130      5      4
##  3 Hon_BeS…      2      1      1      1      1      1      1   142      5      5
##  4 Hon_Hid…      1      2      1      1      1      1      1    75      4      3
##  5 Hon_Cov…      3      1      2      1      1      1      1   117      4      4
##  6 Hon_Tri…      2      1      1      1      1      1      1   122      4      4
##  7 Hon_Dec…      1      1      1      1      1      1      1   105      5      5
##  8 Hon_Avo…      2      2      2      1      2      2      2   108      4      4
##  9 Hon_Avo…      2      2      1      1      1      3      2   121      4      4
## 10 Hon_Avo…      2      2      2      2      1      2      3   136      4      4
## # … with 145 more rows, and 18 more variables: R3_Dis <int>, R4_Dis <int>,
## #   R5_Dis <int>, R6_Dis <int>, R7_Dis <int>, Avg_HonLikelihood <dbl>,
## #   Avg_DisLikelihood <dbl>, Diff_Likelihood <dbl>, abs_diff <dbl>,
## #   goal_name <chr>, R1_Dif <int>, R2_Dif <int>, R3_Dif <int>, R4_Dif <int>,
## #   R5_Dif <int>, R6_Dif <int>, R7_Dif <int>, sd <dbl>
exemplar_goals <- goals %>%
  filter(CASE_LBL %in% c("Hon_GetSometh", "Hon_BeSeeBett", "Hon_CoverUp", "Hon_AvoidVuln", "Hon_ProtFeelings", "Hon_AvoidJudg", "Hon_AvoidDoing", "Hon_AvoidReje", "Hon_ProtPriv", "Hon_StopConv", "Hon_PresrvEng", "Hon_AvoidEmb", "Hon_ConfToRole", "Hon_KeepPeace", "Hon_Story", "Hon_GetAhead", "Hon_ControlOther", "Hon_AvoidDisap", "Hon_ExplSelf", "Hon_SeemSmart", "Hon_HurtOther", "Hon_KeepSmooth", "Hon_GetWant", "Hon_ProtEmb", "Hon_BeAttrac", "Hon_PositvDir", "Hon_BeKind", "Hon_HelpGetSom", "Hon_ProtectRel", "Hon_GainConfi", "Hon_BeHumb", "Hon_WasteTime", "Hon_AvoidSusp", "Hon_BeBest", "Hon_Autonomy", "Hon_PutInPlace", "Hon_AvoidGuilt", "Hon_RecogProb", "Hon_SeekHelp", "Hon_FeelClose", "Hon_MakeMean", "Hon_HelpImprov", "Hon_AvoidCaught", "Hon_GainTrust", "Hon_TreatResp", "Hon_AvoidMis", "Hon_ShareMyself", "Hon_RightThing", "Hon_Chest", "Hon_AvoidFake", "Hon_Self_Image", "Hon_BeAuth", "Hon_NeedToKnow", "Hon_CorrectInaccurate"))

ggplot(data = exemplar_goals, aes(x = Diff_Likelihood, y = reorder(CASE_LBL, Diff_Likelihood)))+
         geom_point()

These goals do a pretty nice job of covering a bredth of content as well as the full range of difference scores. Now, let’s make them into a helpful and readable plot.

Like before, I’ve made this plot interactive, so that we can select any given point and find out which goal it represents. Another nice thing about this is it allows us to streamline the graph, and not have the y axis be totally overwhelmed by labels for each goal. I decided to keep the color information from the scatterplot, which makes these two plots into nice companions, showing similar but different information about the ratings we obtained for these goals. Finally, I added a vertical line at 0, so that we can easily see for each goal whether or not the standard deviation of difference scores intersects 0.

exemplar_goals <- exemplar_goals %>%
  mutate(
    R1_Dif = R1_Hon - R1_Dis,
    R2_Dif = R2_Hon - R2_Dis,
    R3_Dif = R3_Hon - R3_Dis,
    R4_Dif = R4_Hon - R4_Dis,
    R5_Dif = R5_Hon - R5_Dis,
    R6_Dif = R6_Hon - R6_Dis,
    R7_Dif = R7_Hon - R7_Dis)

exemplar_goals <- exemplar_goals %>%
  group_by(CASE_LBL) %>%
  mutate(sd = sd(unlist(select(cur_data(), R1_Dif:R7_Dif))))

goals_ex_sd <- exemplar_goals %>%
ggplot(aes(x = Diff_Likelihood, y = reorder(goal_name, Diff_Likelihood), color = abs_diff, label = goal_name))+
         geom_point()+
  geom_errorbar(linewidth = 0.9, aes(xmin = Diff_Likelihood - sd, xmax = Diff_Likelihood + sd, color = abs_diff))+
  geom_vline(xintercept = 0, linetype = "dashed", linewidth = 0.5)+
  coord_cartesian(xlim = c(-4, 4))+
  scale_y_discrete(breaks = NULL)+
  theme(axis.text.y = element_blank(),
        axis.ticks.y = element_blank())+
  theme_bw()+
  labs(title = "Inter-rater variability in goal expectancies",
       y = element_blank(),
       x = "Difference between honesty and dishonesty expectancies",
       color = "Difference")

ggplotly(tooltip = "label", align = "center") %>%
  layout(yaxis = list(showticklabels = FALSE, showgrid = FALSE))